﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductInStore.aspx.cs" Inherits="ModernShopping.User.ProductInStore" MasterPageFile="~/ModernShopping.Master" %>

<%@ Register Src="~/WebUserControls/UCCountDown.ascx" TagName="Countdown" TagPrefix="MyUserControls" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
    <div class="div-center">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="title">
            <asp:Label ID="lblStoreName" Text="SẢN PHẨM ĐANG BÁN"
                runat="server" Width="100%" BorderStyle="None" />
        </div>
        <div class="add-product">
            <div style="width: 90%; margin: 30px auto 30px auto;">
                <br />
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <table style="width: 100%">
                            <tr>
                                <td class="table-title-col" style="width: 145px;">
                                    <asp:Label ID="Label13" runat="server" Text="Cửa hàng:"></asp:Label>
                                </td>
                                <td class="table-input-col">
                                    <asp:DropDownList ID="cboListStore" Width="300px" runat="server" CssClass="textbox" AutoPostBack="True" OnSelectedIndexChanged="cboListStore_SelectedIndexChanged"></asp:DropDownList>
                                </td>
                                <td style="width: 145px;">
                                    <asp:Button ID="btnShow" runat="server" CssClass="button" OnClick="btnShow_Click" Text="HIỂN THỊ" UseSubmitBehavior="False" />
                                </td>
                                <td class="table-input-col">&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="table-title-col" style="width: 145px;">
                                    <asp:Label ID="Label3" runat="server" Text="Địa chỉ:"></asp:Label>
                                </td>
                                <td class="table-input-col" colspan="3">
                                    <asp:Label runat="server" ID="lblAddress" Width="100%"></asp:Label>
                                </td>
                            </tr>
                        </table>
                        <asp:Label ID="lblProductCount" runat="server" CssClass="subheader" Width="100%"></asp:Label>
                        <asp:GridView
                            runat="server"
                            ID="gvMyStores"
                            Width="100%"
                            AutoGenerateColumns="False"
                            BorderColor="#2C7C00" BorderWidth="1px" AllowPaging="True" OnPageIndexChanging="gvMyStores_PageIndexChanging">
                            <AlternatingRowStyle BackColor="#FFFF99" />
                            <Columns>
                                <asp:TemplateField HeaderText="STT">
                                    <ItemTemplate>
                                        <%# Container.DataItemIndex+1 %>
                                    </ItemTemplate>
                                    <ItemStyle Width="50px" />
                                </asp:TemplateField>
                                <asp:HyperLinkField DataTextField="Name" HeaderText="TÊN SẢN PHẨM" DataNavigateUrlFormatString="~/ProductInfo.aspx?ProductCode={0}" DataNavigateUrlFields="ProductCode">
                                    <ItemStyle HorizontalAlign="Left" CssClass="gridview-row-style" VerticalAlign="Middle" />
                                </asp:HyperLinkField>
                                <asp:BoundField HeaderText="GIÁ" DataField="Price" DataFormatString="{0:#,##0} VNĐ">
                                    <ItemStyle Width="200px" HorizontalAlign="Left" Wrap="true" CssClass="gridview-row-style" VerticalAlign="Middle" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="THAO TÁC" ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbRemove"
                                            runat="server"
                                            CommandArgument='<%# Eval("ProductCode")+","+Eval("CodeStore")%>'
                                            OnClick="lbRemove_Click"
                                            CausesValidation="False"
                                            Text="Xóa"></asp:LinkButton>
                                        <ajaxToolkit:ConfirmButtonExtender runat="server" TargetControlID="lbRemove" ConfirmText="Bạn có chắc là muốn đưa sản phẩm này ra khỏi cửa hàng?">
                                        </ajaxToolkit:ConfirmButtonExtender>
                                    </ItemTemplate>
                                    <ItemStyle Width="100px" />
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BackColor="#00A8DF" ForeColor="White" Height="35px" HorizontalAlign="Center" VerticalAlign="Middle" Font-Italic="False" Font-Size="15pt" />
                            <RowStyle Height="35px" Font-Size="13pt" HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
    </div>
    <MyUserControls:Countdown runat="server" ID="Countdown" />
</asp:Content>
